Micron Document




Comment (computer programming)
part 19/37 · 66.0 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Instead of a regular block commenting construct, Perl uses literate programming plain old documentation (POD) markup.cite-ref-40[40] For example:cite-ref-41[41]

=item Pod::List-E<gt>new()
Create a new list object. Properties may be specified through a hash
reference like this:
my $list = Pod::List->new({ -start => $., -indent => 4 });
=cut
sub new {
...
}

Raku (previously called Perl 6) uses the same line comments and POD comments as Perl, but adds a configurable block comment type: "multi-line / embedded comments".cite-ref-perl6-42-0[42] It starts with #` and then an opening bracket character and ends with the matching closing bracket character.cite-ref-perl6-42-1[42] For example:

#`{{ "commenting out" this version
toggle-case(Str:D $s)
Toggles the case of each character in a string:
my Str $toggled-string = toggle-case("mY NAME IS mICHAEL!");
}}
sub toggle-case(Str:D $s) #`( this version of parens is used now ){
...
}

Block in PowerShell

PowerShell supports a block comment delimited by <# and #>. For example:

# Single line comment
<# Multi
Line
Comment #>

Block in Python

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────